import unittest

class TestDemo1(unittest.TestCase):

    def setUp(self):
        print("前置处理".center(50, '*'))

    def tearDown(self):
        print("后置处理".center(50, "*"))

    def test_01(self):
        print("执行用例-test_01")

if __name__ == '__main__':
    # 创建测试套件
    suit = unittest.TestSuite()

    # 往测试套件中添加测试用例类
    suit.addTest(TestDemo1())

    # 运行测试用例
    unittest.TextTestRunner(verbosity=2).run(suit)